<template>
  <div class="recommend">
    <h1>猜你喜欢</h1>
    <div class="recommend_list">
      <div class="list_item" v-for="item in list" :key="item.id">
        <div class="item_img">
          <img :src="item.img_url" alt="">
        </div>
        <div class="item_content">
          <div class="item_box">
           <span>{{item.name}}</span>
           <div class="item_content_footer">
              <span class="star">{{item.star}}分</span>
              <span class="person">{{item.person}}人消费</span>
            </div>
            <div class="item_bottom">
              <span class="number">￥{{item.number}}</span>
              <span class="word">起</span>
              <span class="distance">{{item.distance}}Km</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="recommend_footer">
      <p>查看全部团购</p>
      <span></span>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeRecommend",
  props: {
    list: Array

  }
}
</script>

<style scoped>
.recommend h1{
  text-align: left;
  font-size: .32rem;
  margin-top: .2rem;
}
.list_item{
  border-top: .02rem solid #c1b7b7;
  margin-top: .2rem;
  padding-top: .2rem;
  width: 100%;
  overflow: hidden;
}
.item_img{
  width: 30%;
  float: left;
}
.item_img img{
  width: 100%;
}
.item_content{
  width: 70%;
  float: right;
  text-align: left;
}
.item_box{
  margin: 0 .2rem;
}
.item_content_footer{
  margin-top: .2rem; 
  width: 100%;
  overflow: hidden;
}
.item_content_footer span{
  float: left;
  display: block;
}
.item_content_footer span.star{
  float: left;
  color: chocolate;
}
.item_content_footer span.person{
  color: green;
  font-size: .3rem;
  float: right;
}
.item_bottom span.number{
    color: rgb(38, 15, 241);
    font-size: 20px;
}
.item_bottom span.distance{
  margin-top: 20px;
  float:right;
}
</style>
